using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BO;
using BO.Admin;

namespace Admin.Controls.News
{
    public partial class NewsPhoto : System.Web.UI.UserControl
    {
        public string Link = "";

        protected void Page_Load(object sender, EventArgs e)
        {
            BindData();
        }

        private void BindData()
        {
            int newsid = Utils.QueryString.GetNewsID();
            if (newsid > 0)
            {
                DataTable dt = News_Helper.GetByNewsID(newsid);
                if (dt.Rows[0]["News_Photo"] != DBNull.Value)
                {
                    BigThumb.OrigionalImage = dt.Rows[0]["News_Photo"].ToString();
                    Link = dt.Rows[0]["News_Photo"].ToString();
                }
                else this.Visible = false;
            }
        }
    }
}